﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterNhanSuTienLuong.Master"
    Inherits="System.Web.Mvc.ViewPage<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.TinhLuongModel.LapBangTinhLuongForm>" %>

<%@ Import Namespace="DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/ChamCong/DanhSachBangTinhLuong.js") %>"></script>
    <script type="text/javascript" language="javascript" >
        $(document).ready(function () {
            selectMenu("TinhLuong-DanhSachBangTinhLuong");
            $("#LapBangTingLuong").click(function () {
                window.location.href = basePath + 'TinhLuong/LapBangTinhLuong';
            });
            selectMenu("TinhLuong-DanhSachBangTinhLuong");
            $("#TinhLuong-DanhSachBangTinhLuong").parent().attr("class", "active");
        });
    </script>
    <style type="text/css">
        .ContainerSelectDate
        {
            width: 242px;
            float: right;
            position: relative;
            top: 8px;
            right: 10px;
        }
        .ContainerSelectDate .labelSelectDate
        {
            color: #fff;
            font-weight: bold;
        }
        .ContainerSelectDate .previousDate, .ContainerSelectDate .nextDate
        {
            margin-top: 0px;
            padding: 0px;
            vertical-align: top;
        }
        .ContainerSelectDate .txtSelectDate
        {
            width: 80px;
            text-align: center;
        }
        .ContainerSelectDate .btnSelectDate
        {
            margin-top: 0px;
            vertical-align: top;
        }
        
        .ContainerMessage
        {
            margin-left: 1.5%;
            margin-bottom: 5px;
        }
        .ContainerMessage .MessageSuccess
        {
            font-size: 12px;
            color: Blue;
            font-weight: bold;
        }
        .ContainerMessage .MessageError
        {
            font-size: 12px;
            color: Red;
            font-weight: bold;
        }
        
        .ContainerKyHieuChamCong
        {
            margin-left: 1.5%;
            clear: both;
        }
        .ContainerKyHieuChamCong li
        {
            float: left;
            width: 8%;
        }
        .ContainerKyHieuChamCong li input[type=radio]
        {
            height: auto;
        }
        
        .ContainerTangCa
        {
            margin-left: 1.5%;
            margin-right: 1.5%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="box">
        <div class="breadcrumbs">
            <ul>
                <li class="home"><a href="">Quản lý chấm công</a></li>
                <li><a href="">Tiền bồi dưỡng</a></li>
                <li>Page</li>
            </ul>
        </div>
        <div class="headlines">
            <h2>
               <span> Danh sách bảng tính lương</span>
            </h2>
        </div>
        <div class="box-content formBox">
            <form id="form1">
           
            <%: Html.HiddenFor(p => p.IsLock) %>
            <%: Html.HiddenFor(p => p.IsFinish) %>
            <input type="text" style="display: none;" />
            <div class="ContainerMessage">
                <div id="MessageSuccess" class="MessageSuccess">
                    <%=Model.MessageSuccess%>
                </div>
                <div id="MessageError" class="MessageError">
                    <%=Model.MessageError%>
                </div>
            </div>
            <div>
            </div>
            <div class="pagebreak">
                &nbsp;</div>
            <table class="table_outsite" style="width:100%">
               <tr>
               <td style="text-align:right">
               <input type ="button" class="button" name = "LapBangTingLuong" id = "LapBangTingLuong" value="Lập bảng tính lương" />
               </td>
               </tr>
                <tr>
                    <td colspan="3">
                        <table class="tab tab-drag">
                            <thead>
                                <tr class="top nodrop nodrag">
                                   <%-- <td class="first" align="center" nowrap="nowrap" style="width: 30px;">
                                        <input type="checkbox" id="checkAll1" onclick="CheckAlls('checkAll1', 'checkSingle1', 'form1')"
                                            name="chkChon" />
                                    </td>--%>
                                    <td align="center" nowrap="nowrap" style="width: 50px;">
                                        STT
                                    </td>
                                     <td nowrap="nowrap" style="width: 80px;">
                                        <strong>Tháng tính lương</strong>
                                    </td>
                                    <td nowrap="nowrap">
                                        <strong>Năm tính lương</strong>
                                    </td>
                                    <td nowrap="nowrap">
                                        <strong>Người lập</strong>
                                    </td>
                                    <td nowrap="nowrap">
                                        <strong>Người ký</strong>
                                    </td>
                                     <td nowrap="nowrap">
                                        <strong>Khóa</strong>
                                    </td>
                                     <td nowrap="nowrap">
                                        <strong>Hoàn thành</strong>
                                    </td>
                                      <td nowrap="nowrap">
                                       
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
                                <% 
                                    int stt = 1;
                                    foreach (var item in Model.DanhSachTinhLuongPagedList)
                                    {
                                %>
                                <tr class="item_row" >
                                    <td align="center">
                                        <%= stt %>
                                    </td>
                                    <td style="text-align: center; width: 60px;cursor:pointer" onclick="window.location.href= basePath + 'TinhLuong/LapBangTinhLuong/'+<%=item.ID%>">
                                     <a>   <%= item.Thang %></a>
                                    </td>
                                    <td nowrap="nowrap" style="cursor:pointer" onclick="window.location.href= basePath + 'TinhLuong/LapBangTinhLuong/'+<%=item.ID%>">
                                       <a> <%= item.Nam%></a>
                                    </td>
                                    <td nowrap="nowrap">
                                        <%= item.HoTenNguoiLapBieu %>
                                    </td>
                                    <td nowrap="nowrap" style="text-align: center;">
                                        <%= item.HoTenNguoiKy %>
                                    </td>
                                    <td style="text-align: center;">
                                            <% if (item.IsLock)
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/lock.png" height="16" width="16" alt="True"/>
                                                <%}
                                                else
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/unlock.png" height="16" width="16" alt="True"/>
                                                <%} %>
                                    </td>
                                    <td style="text-align: center;">
                                            <% if (item.IsFinish)
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/finished.png" height="16" width="16" alt="True"/>
                                                <%}
                                                else
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/unfinished.png" height="16" width="16" alt="True"/>
                                                <%} %>
                                    </td>
                                    <td style="text-align: center;">
                                      <a style="cursor:pointer" title="Xem bảng tính lương chi tiết" onclick="window.location.href= basePath + 'TinhLuong/TinhLuongHangThang/'+<%=item.ID%>">Xem bảng tính lương</a>
                                    </td>
                                </tr>
                                <%
                                stt++;
                                }
                                %>
                            </tbody>
                            <tfoot>
                                <tr class="border_bottom">
                                    <td class="first" style="background: #DDDDDD">
                                    </td>
                                    <td class="last" colspan="9" style="background: #DDDDDD; padding-right: 10px;text-align:right">
                                        <%
                                            PagerOptions pagerOptions = new PagerOptions();
                                            CommonDelegate CommonDelegate
                                                = new CommonDelegate();
                                            CommonDelegate.ChangeTextPaging(pagerOptions, "pageIndex");
                                        %>
                                        <div>
                                            <%=Html.Pager(Model.DanhSachTinhLuongPagedList, pagerOptions)%></div>
                                        <%=Html.Hidden("PageIndex", Model.PagedNumber)%>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </td>
                </tr>
            </table>
            </form>
        </div>
    </div>
    
</asp:Content>
